@extends('admin.layout.index')
@section('title', '后台专栏列表')
@section('header', '专栏列表')
@section('con')
<div class="panel panel-default">
    <div class="panel-body">
        <div class="dataTable_wrapper">
            <div id="dataTables-example_wrapper" class="dataTables_wrapper form-inline dt-bootstrap no-footer">
                <div class="row">
                    <div class="col-sm-6"> 
                    <form action="/admin/zhuanlan/list" method="get">
                        <div id="dataTables-example_filter" class="dataTables_filter">
                            <label>专栏名:
                                <input name="name" class="form-control input-sm" placeholder="" aria-controls="dataTables-example" type="search">
                            </label>
                            <button type="submit" class="btn btn-success">搜索</button>
                        </div>
                    </form>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-12">
                    <table class="table table-striped table-bordered table-hover">
                        <thead style="align:center;">
                            <tr>
                                <th>ID</th>
                                <th>专栏名</th>
                                <th>专栏头像</th>
                                <th>话题</th>
                                <th>备注</th>
                                <th>状态</th>
                                <th>文章</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        <tbody align="center">

                        @foreach($data as $k=>$v)
                            <tr>
                                <td>{{$v->id}}</td>
                                <td>{{$v->cname}}</td>
                                <td><img src="{{$v->zlpic}}" alt="" style="width:100px;"></td>
                                <td>{{$v->title}}</td>
                                <td>{{$v->content}}</td>
                                <td>{{(($v->status)==1)?'已禁用':'已启用'}} </td>
                                <td><a href="/admin/zhuanlan/article?id={{$v->id}}">查看文章</a></td>
                               
                                <td><a href="/admin/zhuanlan/update?id={{$v->id}}">{{(($v->status)==0)?'禁用':'启用'}}</a></td>
                              
                            </tr>
                        @endforeach
                        </tbody>
                    </table>
                {!! $data->appends($all)->render() !!}

                </div>
            </div>
        
        </div>
    </div>
    <!-- /.table-responsive -->
</div>
@endsection
                                